<?php
require("../class/connect.php");
?>
<html>
<head>
<title>WY网站管理系统 - 安全、稳定、强大、灵活 - Powered by WYCMS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link media="all" type="text/css" rel="stylesheet" href="../skin/def/css/adm.css">
<script>
if(self!=top)
{
	parent.location.href='index.php';
}
function CheckLogin(obj){
	if(obj.username.value=='')
	{
		alert('请输入用户名');
		obj.username.focus();
		return false;
	}
	if(obj.password.value=='')
	{
		alert('请输入登录密码');
		obj.password.focus();
		return false;
	}
	if(obj.loginauth!=null)
	{
		if(obj.loginauth.value=='')
		{
			alert('请输入认证码');
			obj.loginauth.focus();
			return false;
		}
	}
	if(obj.key!=null)
	{
		if(obj.key.value=='')
		{
			alert('请输入验证码');
			obj.key.focus();
			return false;
		}
	}
	return true;
}
</script>
</head>

<body text="383636" bgcolor="#FFFFFF" onLoad="document.login.username.focus();" style="text-align:center;">
<div class="loginbox">
    	<h2>CMS管理系统</h2>
        <div class="content">	
         <form name="login" method="post" action="cmsadmin.php" onSubmit="return CheckLogin(document.login);">
    <input type="hidden" name="cmsaction" value="login">	
        	<ul style="display:block" class="loginform">
                <li>
					<label class="lab">用户名：</label>
					<input name="username" type="text" class="b-form2" size="22">
				</li>
              <li>
					<label class="lab">密&nbsp;&nbsp;码：</label>
                    <input name="password" type="password" class="b-form2" size="22">
              </li>
                <li><label class="lab">&nbsp;</label><a class="c_blue" target="_blank" href="#">忘记密码？</a>|<a class="c_blue" target="_blank" href="#" tabindex="11">忘记用户名？</a></li>
                <?php
		  if(empty($public_r['adminloginkey']))
		  {
		  ?>
                <li style="display:none" id="verifyDiv">
					<label class="lab">验证码：</label>
					 <input name="key" type="text" class="b-form2" size="9">&nbsp;
					<img src="ShowKey.php" name="KeyImg" id="KeyImg" align="bottom" onClick="KeyImg.src='ShowKey.php?'+Math.random()" alt="看不清楚,点击刷新">				</li>     
                <?php
		  }
		  ?>            
                <li class="li_b">
					<button class="btn_in2" id="btn_login" type="submit" tabindex="10">登 录</button>
				</li>                
            </ul>
          </form>
        </div>
    </div>

<div class="footer">
	<div class="f-nav"><a target="_blank" href="#">关于CMS</a><span>|</span><a target="_blank" href="#">XXXX</a></div>
	<div class="copyright">
		<p>&copy; Powered by CMS 6.0 © 2011-~ CMS Inc. </p>
	</div>
</div>
</body>
</html>
